Пример: def tricky(x): return x * 2 + 1 if x > 0 else x - 1
explain_bytecode(tricky)
Этот хак показывает байткод Python-функции, позволяя заглянуть под капот интерпретатора. Используется для:
• отладки «странного» поведения функций • анализа производительности на уровне Python VM • изучения, как Python интерпретирует тернарные выражения, замыкания, генераторы и т. д.
Модуль dis встроен в стандартную библиотеку и часто игнорируется — но это мощный инструмент для продвинутых разработчиков и авторов интерпретаторов.
Пример: def tricky(x): return x * 2 + 1 if x > 0 else x - 1
explain_bytecode(tricky)
Этот хак показывает байткод Python-функции, позволяя заглянуть под капот интерпретатора. Используется для:
• отладки «странного» поведения функций • анализа производительности на уровне Python VM • изучения, как Python интерпретирует тернарные выражения, замыкания, генераторы и т. д.
Модуль dis встроен в стандартную библиотеку и часто игнорируется — но это мощный инструмент для продвинутых разработчиков и авторов интерпретаторов.
At a time when the Indian stock market is peaking and has rallied immensely compared to global markets, there are companies that have not performed in the last 10 years. These are definitely a minor portion of the market considering there are hundreds of stocks that have turned multibagger since 2020. What went wrong with these stocks? Reasons vary from corporate governance, sectoral weakness, company specific and so on. But the more important question is, are these stocks worth buying?
Newly uncovered hack campaign in Telegram
The campaign, which security firm Check Point has named Rampant Kitten, comprises two main components, one for Windows and the other for Android. Rampant Kitten’s objective is to steal Telegram messages, passwords, and two-factor authentication codes sent by SMS and then also take screenshots and record sounds within earshot of an infected phone, the researchers said in a post published on Friday.